de.ueberdosis.mp3info
Class ExtendedID3Tag

java.lang.Object
  |
  +--de.ueberdosis.mp3info.ID3Tag
        |
        +--de.ueberdosis.mp3info.ExtendedID3Tag
All Implemented Interfaces:
Defines

public class ExtendedID3Tag
extends ID3Tag

This class contains all interesting information about an mp3.


Field Summary
static java.lang.String[][] bitrates
          String represenations of the bitrates
static int[][] bitratesI
          Int representations of the bitrates.
static java.lang.String[] channelModes
          String representation of the channel modes
static int[] channels
          Int representation of the channel modes.
 java.lang.String[] emps
          String representation of the possible emphasis-values
static java.lang.String[][] frequencies
          String representation of the samplerates
static int[][] frequenciesI
          Int representation of the samplerates.
 
Fields inherited from class de.ueberdosis.mp3info.ID3Tag
genres
 
Fields inherited from interface de.ueberdosis.mp3info.Defines
DEFAULT_ENCODING, ID3V2_FOOTER_SIZE, ID3V2_FRAME_HEADER_SIZE, ID3V2_HEADER_SIZE, ID3V2_X_HEADER_SIZE, MP3_FRAME_HEADER_SIZE, SUPPORTED_NUMBER_OF_EXTENDED_FLAG_BYTES, testPositions, VERSION
 
Constructor Summary
ExtendedID3Tag(de.ueberdosis.mp3info.ID3Tag tag)
           
 
Method Summary
 int getBitrate()
          gives you the bitrate-ID
 int getBitrate2I()
          gives you the real lower bitrate or 0 if an error occured or this information is otherwise unavailable
 java.lang.String getBitrate2S()
           
 int getBitrateI()
          gives you the real higher bitrate or 0 if an error occured or this information is otherwise unavailable
 java.lang.String getBitrateS()
          gives you a String representation of the bitrate
 int getChannelMode()
          Gives you the channel Mode as an ID
 java.lang.String getChannelModeS()
          Gives you a String representation of the channel mode
 boolean getCopyright()
          Gets if the material contained in this mp3 is copyrighted
 boolean getCrc()
          returns if CRC-Protection is on
 int getEmphasis()
          gets the emphasis as an ID
 java.lang.String getEmphasisS()
          Gives you a String representation of the emphasis used
 int getFramecount()
          Gives you the frame count, or 0 if there has been an error counting
 int getFrequency()
          Gets the samplerate as an ID.
 int getFrequencyI()
          Gives you the real samplerate or 0 if this information is unavailable.
 java.lang.String getFrequencyS()
          Gets a String representation of the samplerate.
 int getLayer()
          gives the layer-ID @see setLayer
 int getLayerI()
           
 java.lang.String getLayerS()
          gives a String representation of the Layer
 int getMpegID()
          returns the MpegID.
 java.lang.String getMpegIDS()
          returns a String representation of the Mpeg-level.
 boolean getOriginal()
          Gets if this mp3 is the original, or if it's only a copy
 boolean getPadding()
          Gets if padding of the frame that supplied the extended information is on
 int getRuntime()
          Gives you the running time in seconds.
 long getSize()
          Gives the size of the examined file
 java.lang.String getTechnicalString()
          gives you one line with technical information
 de.ueberdosis.mp3info.id3v2.ID3V2Tag getV2Tag()
           
 void setBitrate(int b)
          Sets the bitrate as an ID.
 void setBitrate2(int b)
          Sets the lower bitrate as an ID.
 void setChannelMode(int mode)
          Sets the channel Mode as an ID.
 void setCopyright(boolean cp)
          Sets if the material contained in this mp3 is copyrighted
 void setCrc(boolean state)
          Sets if CRC-protection is on
 void setEmphasis(int em)
          Sets the emphasis as an ID
 void setFramecount(int count)
          Sets the amount of frames contained in this file
 void setFrequency(int fre)
          Sets the samplerate as an ID.
 void setKRuntime(long time)
          Sets the running time of the examined file in milliseconds
 void setLayer(int l)
          Sets the layer of the mp3.
 void setMpegID(int id)
          Sets the id of MPeg.
 void setOriginal(boolean or)
          Sets if this mp3 is the original, or if it's only a copy
 void setPadding(boolean pad)
          Sets if padding of the frame that supplied the extended information is on
 void setRuntime(int time)
          Deprecated. as of mp3info V 1.6
 void setSize(long size)
          Sets the size of the examined file
 java.lang.String toString()
          creates a rather large String with all relevant information
 void updateBitrates(de.ueberdosis.mp3info.ExtendedID3Tag tag)
           
 
Methods inherited from class de.ueberdosis.mp3info.ID3Tag
getAlbum, getArtist, getComment, getGenre, getGenreS, getTitle, getTrack, getTrackS, getYear, isValidTag, setAlbum, setArtist, setComment, setGenre, setGenre, setTitle, setTrack, setTrack, setYear, toByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bitrates

public static final java.lang.String[][] bitrates
String represenations of the bitrates


bitratesI

public static final int[][] bitratesI
Int representations of the bitrates. -1 means free, -2 bad. In any implementation, a bitrate of < 1 should result in a new request to @see bitrates .


frequencies

public static final java.lang.String[][] frequencies
String representation of the samplerates


frequenciesI

public static final int[][] frequenciesI
Int representation of the samplerates. Values lower than 1 are special and should result in a request to frequencies-


channelModes

public static final java.lang.String[] channelModes
String representation of the channel modes


channels

public static final int[] channels
Int representation of the channel modes. 1 = mono, 2 = stereo, sound logical, doesn't it? 0 is an error and should result in a request to @see channelModes .


emps

public final java.lang.String[] emps
String representation of the possible emphasis-values

Constructor Detail

ExtendedID3Tag

public ExtendedID3Tag(de.ueberdosis.mp3info.ID3Tag tag)
Method Detail

setMpegID

public void setMpegID(int id)
Sets the id of MPeg. Watch out that this is NOT the same as the MPeg-Version. MPeg-ID 3 equals "Mpeg 1".


getMpegID

public int getMpegID()
returns the MpegID.

See Also:
setMpegID.

getMpegIDS

public java.lang.String getMpegIDS()
returns a String representation of the Mpeg-level.


setLayer

public void setLayer(int l)
Sets the layer of the mp3. watch out, this ID is not the same as the real Layer. Layer 1 equals "Layer III".


getLayer

public int getLayer()
gives the layer-ID @see setLayer


getLayerS

public java.lang.String getLayerS()
gives a String representation of the Layer


getLayerI

public int getLayerI()
Returns:
the layer

setBitrate

public void setBitrate(int b)
Sets the bitrate as an ID. Watch out that this ID is NOT the real bitrate. Only a pointer to a 2-dimensional array, dependend on MpegID and Layer


setBitrate2

public void setBitrate2(int b)
Sets the lower bitrate as an ID. Watch out that this ID is NOT the real bitrate. Only a pointer to a 2-dimensional array, dependend on MpegID and Layer


getBitrateS

public java.lang.String getBitrateS()
gives you a String representation of the bitrate


getBitrate

public int getBitrate()
gives you the bitrate-ID


getBitrateI

public int getBitrateI()
gives you the real higher bitrate or 0 if an error occured or this information is otherwise unavailable


getBitrate2I

public int getBitrate2I()
gives you the real lower bitrate or 0 if an error occured or this information is otherwise unavailable


getBitrate2S

public java.lang.String getBitrate2S()

setCrc

public void setCrc(boolean state)
Sets if CRC-protection is on


getCrc

public boolean getCrc()
returns if CRC-Protection is on


setFrequency

public void setFrequency(int fre)
Sets the samplerate as an ID. This is not the same as the real samplerate


getFrequency

public int getFrequency()
Gets the samplerate as an ID. This is not the same as the real samplerate


getFrequencyS

public java.lang.String getFrequencyS()
Gets a String representation of the samplerate.


getFrequencyI

public int getFrequencyI()
Gives you the real samplerate or 0 if this information is unavailable.


setPadding

public void setPadding(boolean pad)
Sets if padding of the frame that supplied the extended information is on


getPadding

public boolean getPadding()
Gets if padding of the frame that supplied the extended information is on


setChannelMode

public void setChannelMode(int mode)
Sets the channel Mode as an ID.


getChannelMode

public int getChannelMode()
Gives you the channel Mode as an ID


getChannelModeS

public java.lang.String getChannelModeS()
Gives you a String representation of the channel mode


setCopyright

public void setCopyright(boolean cp)
Sets if the material contained in this mp3 is copyrighted


getCopyright

public boolean getCopyright()
Gets if the material contained in this mp3 is copyrighted


setOriginal

public void setOriginal(boolean or)
Sets if this mp3 is the original, or if it's only a copy


getOriginal

public boolean getOriginal()
Gets if this mp3 is the original, or if it's only a copy


setEmphasis

public void setEmphasis(int em)
Sets the emphasis as an ID


getEmphasis

public int getEmphasis()
gets the emphasis as an ID


getEmphasisS

public java.lang.String getEmphasisS()
Gives you a String representation of the emphasis used


getSize

public long getSize()
Gives the size of the examined file


setSize

public void setSize(long size)
Sets the size of the examined file


setRuntime

public void setRuntime(int time)
Deprecated. as of mp3info V 1.6

Sets the running time of the examined file in seconds


setKRuntime

public void setKRuntime(long time)
Sets the running time of the examined file in milliseconds


getRuntime

public int getRuntime()
Gives you the running time in seconds. This value is either correctly computed while counting all frames or guessed by assuming that the whole file uses the same bitrate as this frame.


setFramecount

public void setFramecount(int count)
Sets the amount of frames contained in this file


getFramecount

public int getFramecount()
Gives you the frame count, or 0 if there has been an error counting


toString

public java.lang.String toString()
creates a rather large String with all relevant information

Overrides:
toString in class java.lang.Object

getTechnicalString

public java.lang.String getTechnicalString()
gives you one line with technical information


getV2Tag

public de.ueberdosis.mp3info.id3v2.ID3V2Tag getV2Tag()

updateBitrates

public void updateBitrates(de.ueberdosis.mp3info.ExtendedID3Tag tag)